public class ArrArgSwap {
    public static void main(String[] args) {
        int[] arr = {1,3,2,4,5};
        swap(1,2,arr);
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + " ");
        }
    }
    public static void swap(int i1,int i2,int[] arr){
        int temp = arr[i1];
        arr[i1] = arr[i2];
        arr[i2] = temp;
    }
}
